package com.winchain.provider.expiration.service.impl;

import com.winchain.provider.expiration.service.BillExpThreadService;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import org.springframework.stereotype.Service;

@Service("billExpThreadService")
public class BillExpThreadServiceImpl implements BillExpThreadService {
	private ExecutorService executor = Executors.newCachedThreadPool();

	public void execute(Runnable runnable) {
		this.executor.execute(runnable);
	}

	public Future<?> submit(Callable<?> callable) {
		return this.executor.submit(callable);
	}
}
